#ifndef RECV_VIDEO_THREAD_H
#define RECV_VIDEO_THREAD_H

#include "udp.h"

#include <unistd.h>

#include <QThread>
#include <QImage>

class MyRecvVideoThread : public QThread
{
    Q_OBJECT

public:
    MyRecvVideoThread(uint16_t listen_port, uint16_t ch);
    void stop();

private:
    uint16_t port;
    uint16_t channel;
    bool stop_flag;

protected:
    void run() override;

signals:
    void update_video_frame(QImage image);
    void update_video_state(int val);
    void update_video_log(QString log);
};

#endif // RECV_VIDEO_THREAD_H

